//
//  YYJLFunyResultController.m
//  YuanyangJinlou
//
//  Created by mac004 on 2017/1/9.
//  Copyright © 2017年 suli19910309@qq.com. All rights reserved.
//

#import "YYJLFunyResultController.h"

@interface YYJLFunyResultController ()
{
    UIImageView * tipImgView;//是否过关标示
    UIImageView * starImgView;//是否过关星星
    UILabel     * passLb;//过关提示
    UILabel     * integralLb;//积分提示
    UILabel     * particularLb;//考试具体详情
}
@end

@implementation YYJLFunyResultController

- (void)viewDidLoad {
    [super viewDidLoad];
    // Do any additional setup after loading the view.
    [self setTitleView:@"测评报告"];
    [self setBackItem];
    [self creatUI];
}
-(void)creatUI{
    UIView * bgView =[[ UIView alloc]initWithFrame:CGRectMake(12*PER_WIDTH, 64+30*PER_HEIGHT, SCREEN_WIDTH-24*PER_WIDTH, 420*PER_HEIGHT)];
    bgView.backgroundColor=WHITE_COLOR;
    [self.view addSubview:bgView];
    
    UIImage * img1=[UIImage imageNamed:@"ico_biaoqian"];//119*36
    UIImageView * funny =[[UIImageView alloc]initWithFrame:CGRectMake(bgView.width/2-img1.size.width/2*PER_WIDTH, 0, img1.size.width*PER_WIDTH, img1.size.height*PER_HEIGHT)];
    funny.image=img1;
    [bgView addSubview:funny];
    UILabel * testName =[MyControl createLabelWithFrame:CGRectMake(0, 10.5*PER_HEIGHT, bgView.width, 15*PER_HEIGHT) Font:15 Text:@"趣味答题" Color:WHITE_COLOR];
    testName.textAlignment=NSTextAlignmentCenter;
    [bgView addSubview:testName];
    
    UIImage * img2 =[UIImage imageNamed:@"ico_success"];//176*113
    tipImgView=[[UIImageView alloc]initWithFrame:CGRectMake(bgView.width/2-img2.size.width/2*PER_WIDTH, 70*PER_HEIGHT, img2.size.width*PER_WIDTH, img2.size.height*PER_HEIGHT)];
    tipImgView.image=img2;
    [bgView addSubview:tipImgView];
    
    passLb =[MyControl createLabelWithFrame:CGRectMake(0, tipImgView.bottom+16*PER_HEIGHT, bgView.width, 18*PER_HEIGHT) Font:18 Text:@"真遗憾,通关失败" Color:BLACK_COLOR];
    passLb.textAlignment=NSTextAlignmentCenter;
    [bgView addSubview:passLb];
    
    integralLb =[MyControl createLabelWithFrame:CGRectMake(0, passLb.bottom+15*PER_HEIGHT, bgView.width, 16*PER_HEIGHT) Font:16 Text:@"未能获得积分,再接再厉哦" Color:BLACK_COLOR];
    integralLb.textAlignment=NSTextAlignmentCenter;
    [bgView addSubview:integralLb];
    
    UIImage * starImg =[ UIImage  imageNamed: @"ico_xingxing"];//62*14
    starImgView =[[UIImageView alloc]initWithFrame:CGRectMake(bgView.width/2-starImg.size.width/2*PER_WIDTH, integralLb.bottom+10*PER_HEIGHT, starImg.size.width*PER_WIDTH, starImg.size.height*PER_HEIGHT)];
    starImgView.image=starImg;
    [bgView addSubview:starImgView];
    
    //结果view
    UIView * resultView=[[UIView alloc]initWithFrame:CGRectMake(71.5*PER_WIDTH, starImgView.bottom+25*PER_HEIGHT,200*PER_WIDTH, 90*PER_HEIGHT)];
    resultView.layer.cornerRadius=10;
    resultView.layer.borderColor=UIColorFromHex(0xcccccc).CGColor;
    resultView.layer.borderWidth=0.5;
    [bgView addSubview:resultView];
    
    particularLb =[MyControl createLabelWithFrame:CGRectMake(24*PER_WIDTH, 29*PER_HEIGHT, resultView.width-48*PER_WIDTH, 40*PER_HEIGHT) Font:16 Text:@"共10道题,答对了8道,还有两道题未答对哦!" Color:TINK_COLOR];
    [resultView addSubview:particularLb];
}

- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

@end
